package com.isoftstone.merchant.dao.merchant;


import com.isoftstone.common.Page;
import com.isoftstone.merchant.entity.merchant.Merchant;
import com.isoftstone.util.PageData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MerchantMapper {

    int deleteByPrimaryKey(String corpId);

    int insert(Merchant record);

    int insertSelective(Merchant record);

    Merchant selectByPrimaryKey(String corpId);
    Merchant selectByCode(String corpCode);

    int updateByPrimaryKey(Merchant record);

    List<Merchant> getMerchantlistPage(Page page);

    int disableMerchant(PageData pd);

    int updateByCorpId(Merchant merchant);

    /**
     * 查询指定缴费地区下的缴费单位
     */
    List<Merchant> getMerchantBycityId(String cityId) throws Exception;

    /**
     * 根据open_account查询签约的缴费单位
     */
    List<Merchant> getPaymentSignProject(String openAccount)throws Exception;

    List<Merchant> getMemberShipMerchant(@Param("openAccount") String openAccount, @Param("cityCode") String cityCode)throws Exception;

    List<Merchant> getMerchantList(PageData pd)throws Exception;

    String getCorpNameBycorIp(@Param("corpId") String corpId)throws Exception;
}